// <com.woyouqiu.Copyright>
// --------------------------------------------------------------
// <copyright>上海有求网络科技有限公司 2015</copyright>
// <Solution>MyCompany.MyProject</Solution>
// <Project>MyCompany.MyProject.Application</Project>
// <FileName>IAgentAppService.cs</FileName>
// <CreateTime>2017-04-25 16:09</CreateTime>
// <Author>何苗</Author>
// <Email>hemiao@woyouqiu.com</Email>
// <log date="2017-04-25 16:09" version="00001">创建</log>
// --------------------------------------------------------------
// </com.woyouqiu.Copyright>

using System.Threading.Tasks;
using Abp.Application.Services;
using Abp.Application.Services.Dto;
using Vecen.BangChuang.BangChuang.Agents.Dtos;

namespace Vecen.BangChuang.BangChuang.Agents {
    /// <summary>
    /// 
    /// </summary>
    public interface IAgentAppService: IApplicationService {
        /// <summary>
        /// 根据ID获得代理商
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<AgentOutDto> GetByIdAsync(int id);

        /// <summary>
        /// 根据城市获得代理商
        /// </summary>
        /// <param name="cityId"></param>
        /// <returns></returns>
        Task<AgentOutDto> GetByCityIdAsync(int cityId);

        /// <summary>
        /// 获得代理商列表
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<ListResultDto<AgentOutDto>> GetAgentsAsync(GetAgentsRequestDto input);


        /// <summary>
        /// 获得店长列表
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PagedResultDto<AgentOutDto>> GetAgentsForAdminAsync(GetAgentsForAdminInputDto input);

        /// <summary>
        /// 升级普通用户为代理商
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task UpgradeUserToAgentAsync(UpgradeUserToAgentRequestDto input);

        /// <summary>
        /// 申请升级为代理商
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task ApplyUpdateToAgentAsync(ApplyUpdateToAgentRequestDto input);

        /// <summary>
        /// 获得我的客户
        /// </summary>
        /// <returns></returns>
        Task<PagedResultDto<AgentClientOutDto>> GetMyClientAsync(GetMyClientRequestDto input);


        /// <summary>
        /// 修改店长资料
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task UpdateAgentProfileAsync(AgentProfileInputDto input);


        /// <summary>
        /// 吊销店长资格
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task RevokeAgentAsync(EntityDto input);

        /// <summary>
        /// 获取未确认的店长升级记录
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PagedResultDto<AgentApplyListDto>> GetNoConfirmedApplyAsync(GetNoConfirmedApplyInputDto input);


        /// <summary>
        /// 撤销待确认的店长
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task RevokeAgentApplyAsync(EntityDto input);


        /// <summary>
        /// 直接升级待确认的店长
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task NoNeedConfirmApplyAsync(EntityDto input);


        /// <summary>
        /// 获得当前店长标识
        /// </summary>
        /// <returns></returns>
        Task<string> GetAgentPrimaryKey();


        /// <summary>
        /// 获得所有店长的学校名称(去重)
        /// </summary>
        /// <returns></returns>
        Task<ListResultDto<string>> GetUniversityNamesAsync();
    }
}